//
//  FControl.h
//  test
//
//  Created by 袁飞 on 12-7-12.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
@interface FControl : CCLayerColor{
    double    time_begin_;
    CGPoint   point_begin_;
    bool      touch_in_;
}
-(id)init;
-(void)registerWithTouchDispatcher;
-(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event;
-(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event;
-(void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event;


-(void)onTouchDown:(CGPoint)point;
-(void)onTouchUp:(CGPoint)point;
-(void)onTouchCancel:(CGPoint)point;
-(void)onClick:(CGPoint)point;
-(void)onSlideBegin:(CGPoint)begin End:(CGPoint)end Time:(double)t;


-(CGPoint)touchLocation:(UITouch *)touch;
-(CGRect)getControlRect;
-(CGSize)getControlSize;
-(bool)isContainPoint:(CGPoint)p;

-(void)drawAnchorPoint;
@end
